<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: widget  G.DataGrid   (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css?stamp=1314485901.55" />
	<link rel="stylesheet" type="text/css" href="assets/api.css?stamp=1314485901.55" />

    <script type="text/javascript" src="assets/api-js?stamp=1314485901.55"></script>
    <script type="text/javascript" src="assets/ac-js?stamp=1314485901.55"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="g-javascript-lib">g-javascript-lib</a></h1>
        <h3>widget&nbsp; <span class="subtitle">1.0.0</span></h3>
        <a href="./index.html" title="g-javascript-lib">g-javascript-lib</a> 
            &gt; <a href="./module_widget.html" title="widget">widget</a>
                 &gt; G.DataGrid 
                
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                    <h2>
                        

                        
                        
                            Class <b property="yui:name">G.DataGrid</b>
                        <span class="extends">
                        </span>

                    </h2>
                    <!-- class tree goes here -->
                    
                
  

                    <div class="summary description" property="yui:description">
                        
                    </div>

                    
                    <div rel="yui:properties" resource="#properties">

                    </div>

                    <div rel="yui:methods" resource="#methods">
                        <div class="section method details">
                            <h3 id="methods">Methods</h3>
                            <div class="content">
                                    <div class="" rel="yui:method" resource="#method_clear_view">
                                    <h4>
                                        <a name="method_clear_view">clear_view</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">clear_view</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Remove all rows in body. and reset the scrollbar
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_current_page">
                                    <h4>
                                        <a name="method_current_page">current_page</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        integer
                                            <strong property="yui:name">current_page</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Get current page number. The number of the first page is 1.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        integer
                                                    </code></dt>
                                                    <dd property="yui:returnInfo">the page number</dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_first_page">
                                    <h4>
                                        <a name="method_first_page">first_page</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">first_page</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Show the first page of data
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_go">
                                    <h4>
                                        <a name="method_go">go</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">go</strong>
                                           (
                                                
                                                        
                                                         offset
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Get a page of data from data source at offset. and show it when data arrived.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">offset</span>
                                                        &lt;<span property="yui:type">integer</span>&gt;
                                                        </code>
                                                        <span property="yui:description"></span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_last_page">
                                    <h4>
                                        <a name="method_last_page">last_page</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">last_page</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Show the last page of data.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_link_data">
                                    <h4>
                                        <a name="method_link_data">link_data</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">link_data</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Link the grid to a data source. the datagird will show the first page of
data on data ready.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_next_page">
                                    <h4>
                                        <a name="method_next_page">next_page</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">next_page</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Show next page of data if there are more after this page
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_page_total">
                                    <h4>
                                        <a name="method_page_total">page_total</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        integer
                                            <strong property="yui:name">page_total</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Get total pages of all data.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        integer
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_prev_page">
                                    <h4>
                                        <a name="method_prev_page">prev_page</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">prev_page</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Show previous page if it's not at begining of data.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_set_current">
                                    <h4>
                                        <a name="method_set_current">set_current</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">set_current</strong>
                                           (
                                                
                                                        
                                                         curr
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Highlight a row as current. The view area will scroll up ro down if the row
is out of it.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">curr</span>
                                                        &lt;<span property="yui:type">integer</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  number of the row. the number of first row is 0</span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_set_page_size">
                                    <h4>
                                        <a name="method_set_page_size">set_page_size</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">set_page_size</strong>
                                           (
                                                
                                                        
                                                         size
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Set the page size. the datagrid will jump to the first page
after the pagesize changed.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">size</span>
                                                        &lt;<span property="yui:type">integer</span>&gt;
                                                        </code>
                                                        <span property="yui:description"></span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                            </div>
                        </div>

                    </div>

                    <div rel="yui:events" resource="#events">


                    </div>

                    <div rel="yui:attributes" resource="#configattributes">

                    </div>

			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_base.html" title="base">base</a></li>
                                <li class=""><a href="module_test.html" title="test">test</a></li>
                                <li class=""><a href="module_utils.html" title="utils">utils</a></li>
                                <li class="selected"><a href="module_widget.html" title="widget">widget</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class="selected"><a href="G.DataGrid.html" title="G.DataGrid">G.DataGrid</a></li>
                                <li class=""><a href="G.TreeView.html" title="G.TreeView">G.TreeView</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="layout.js.html" title="layout.js">layout.js</a></li>
                                <li class=""><a href="scrollbar.js.html" title="scrollbar.js">scrollbar.js</a></li>
                                <li class=""><a href="treeview.js.html" title="treeview.js">treeview.js</a></li>
                        </ul>
                    </div>


                    <div id="methodsList" class="module">
                        <h4>Methods</h4>
                        <ul class="content">        
                                <li class=""><a href="#method_clear_view" title="clear_view">clear_view</a></li>
                                <li class=""><a href="#method_current_page" title="current_page">current_page</a></li>
                                <li class=""><a href="#method_first_page" title="first_page">first_page</a></li>
                                <li class=""><a href="#method_go" title="go">go</a></li>
                                <li class=""><a href="#method_last_page" title="last_page">last_page</a></li>
                                <li class=""><a href="#method_link_data" title="link_data">link_data</a></li>
                                <li class=""><a href="#method_next_page" title="next_page">next_page</a></li>
                                <li class=""><a href="#method_page_total" title="page_total">page_total</a></li>
                                <li class=""><a href="#method_prev_page" title="prev_page">prev_page</a></li>
                                <li class=""><a href="#method_set_current" title="set_current">set_current</a></li>
                                <li class=""><a href="#method_set_page_size" title="set_page_size">set_page_size</a></li>
                        </ul>
                    </div>



            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2011 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">
    ALL_YUI_PROPS = [{"url": "G.DataGrid.html#method_clear_view", "access": "", "host": "G.DataGrid", "type": "method", "name": "clear_view"}, {"url": "G.DataGrid.html#method_current_page", "access": "", "host": "G.DataGrid", "type": "method", "name": "current_page"}, {"url": "G.DataGrid.html#method_first_page", "access": "", "host": "G.DataGrid", "type": "method", "name": "first_page"}, {"url": "G.DataGrid.html#method_go", "access": "", "host": "G.DataGrid", "type": "method", "name": "go"}, {"url": "G.DataGrid.html#method_last_page", "access": "", "host": "G.DataGrid", "type": "method", "name": "last_page"}, {"url": "G.DataGrid.html#method_link_data", "access": "", "host": "G.DataGrid", "type": "method", "name": "link_data"}, {"url": "G.DataGrid.html#method_next_page", "access": "", "host": "G.DataGrid", "type": "method", "name": "next_page"}, {"url": "G.DataGrid.html#method_page_total", "access": "", "host": "G.DataGrid", "type": "method", "name": "page_total"}, {"url": "G.DataGrid.html#method_prev_page", "access": "", "host": "G.DataGrid", "type": "method", "name": "prev_page"}, {"url": "G.DataGrid.html#method_set_current", "access": "", "host": "G.DataGrid", "type": "method", "name": "set_current"}, {"url": "G.DataGrid.html#method_set_page_size", "access": "", "host": "G.DataGrid", "type": "method", "name": "set_page_size"}];
</script>
</body>
</html>
